@import '@folio/stripes-components/lib/variables';

.container {
  position: fixed;
  z-index: 13;
  pointer-events: none;
  right: 0;
  padding: 1.5rem 2rem;
  width: 100%;
}

.bottom {
  bottom: 0;
}

.top {
  top: 20px;
}

.transitionWrapper {
  pointer-events: none;
}

.toast {
  width: 45vw;
  position: relative;
  pointer-events: all;
  background-color: #fff;
  padding: 1rem;
  transition: left 0.4s, right 0.4s, opacity 0.4s;
  border: 1px solid transparent;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius);
  margin-bottom: 4px;

  & .message {
    flex-grow: 2;
    padding: 0 6px;
    font-size: var(--font-size-medium);
  }
}

.slideInBottom {
  animation-name: slideInBottom;
  animation-duration: 1s;
  animation-fill-mode: both;
}

.slideOutBottom {
  animation-name: slideOutBottom;
  animation-duration: 1s;
  animation-fill-mode: both;
}

.slideInTop {
  animation-name: slideInTop;
  animation-duration: 1s;
  animation-fill-mode: both;
}

.slideOutTop {
  animation-name: slideOutTop;
  animation-duration: 1s;
  animation-fill-mode: both;
}

.isOpen {
  display: flex;
}

.error {
  border-color: var(--error);
  background-color: color(var(--error, #600) tint(75%));
}

.warn {
  background-color: var(--warn);
}

.success {
  border-color: var(--success);
  background-color: color(var(--success, #060) tint(75%));
}

.closeIcon {
  fill: #000;
}

@keyframes slideInBottom {
  0% { transform: translate3d(0, 50rem, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes slideOutBottom {
  100% { transform: translate3d(0, 50rem, 0); }
  0% { transform: translate3d(0, 0, 0); }
}

@keyframes slideInTop {
  0% { transform: translate3d(0, -50rem, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes slideOutTop {
  100% { transform: translate3d(0, -50rem, 0); }
  0% { transform: translate3d(0, 0, 0); }
}
